<%#
kind: ptable
name: Windows default partition table
model: Ptable
oses:
- Windows
%>
:: Disk Partitioning Layout

set DPFILE=%SYSTEMDRIVE%\dp.txt

:: Append commands to Diskpart file
echo select disk 0 > %DPFILE%
echo clean >> %DPFILE%
echo create partition primary size=100 >> %DPFILE%
echo select partition 1 >> %DPFILE%
echo active >> %DPFILE%
echo format quick fs=ntfs >> %DPFILE%
echo create partition primary >> %DPFILE%
echo select partition 2 >> %DPFILE%
echo format quick fs=ntfs label="<%= @host.operatingsystem.family -%>" >> %DPFILE%
echo assign letter="C" >> %DPFILE%
echo exit >> %DPFILE%

:: Execute Diskpart with file as script argument
diskpart /s %DPFILE%

:: Remove Diskpart script file
del %DPFILE%
